import Vue from 'vue'
import router from './router'
import store, { GetStore } from './store'
import Mmbs from 'mmbs'
import echarts from 'echarts'
import yt, { bridge } from '@/common/plugin/index.js'
import '@/common/plugin/style/theme/LightBlue.css'
import components from '@/common/components'
import App from './App'
import { SystemName, ServerName, AppId, BaseUrl, IP } from './config'

Vue.prototype.$echarts = echarts
Vue.use(store)
Vue.use(yt)
Vue.use(components)
Vue.config.productionTip = false
document.title = SystemName

Mmbs.initialize(AppId)
Mmbs.allowAnonymousKey = ServerName + 'AllowAnonymousKey' // 在需要开放权限的页面，Mmbs.useAllowAnonymousKey = true 即可（开启或关闭，灵活应用）
Mmbs.useAllowAnonymousKey = true
Mmbs.serverURL = GetStore(IP) || BaseUrl.public

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  template: '<App/>',
  components: { App }
})
